package priv.mill.fanxing;
import org.apache.log4j.Logger;

public class Test2 {

	private static final Logger logger = Logger.getLogger(Test2.class);
	public static void main(String[] args) {
		Person<Car> person = new Person<Car>();
		Car info = person.getInfo(Car.class);
		System.out.println(info);
	}
	
}


class Person<Z> {
	
	private Z info;
	
	private String name;
	
	
	
	public Z getInfo(Z zzz) {
		Z newInstance = null;
		try {
			newInstance = (Z) zzz.getClass().newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		
		return newInstance;
		
	}
	



	public Z getInfo(Class<? extends Z> clzz) {
		Z newInstance = null;
		try {
			newInstance = clzz.newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		
		return newInstance;
		
	}
	
}

class Car{
	
}